/*
* 服务管理订单列表项
* */
'use strict';
import React,{Component} from 'react';
import Util from '../common/util';
import {
    View,
    Text,
    Image,
    TouchableOpacity,
    Animated,
    StyleSheet
} from 'react-native';
import styles from "../style/styles";
import ServiceOrder from './serviceOrder/serviceOrderList';//服务订单列表
import MyVoucher from './userVoucher/myVoucher';//我的服务券码
import ServiceRecord from './userService/serviceRecord';//服务记录
export default class serviceManager extends Component{
    // 构造
      constructor(props) {
        super(props);
        // 初始状态
        this.state = {};
      }

      linkJump(component){
          LOG('role_id==='+this.props.role_id)
          this.props.navigator.push({
              component:component,
              passProps:{
                  user_id:this.props.user_id,
                  role_id:this.props.role_id
              }
          })
      }

      render(){
          let datas=this.props.datas;
          return(
              <View>
                  <View style={styles.user_order_top}>
                      <View style={styles.user_order_left}>
                          <View style={{width:26,height:26,alignItems:'center',justifyContent:'center'}}>
                              <Image style={{height:21,width:24}} source={require('../imgs/center_icon24.png')}
                                     resizeMode={'cover'}/>
                          </View>
                          <Text style={{color:"#333",marginLeft:5, fontSize:16}}>服务管理</Text>
                      </View>
                  </View>
                  <View style={styles.user_order}>
                      <TouchableOpacity style={styles.user_order_list} onPress={()=>this.linkJump(ServiceOrder)}>
                          <View style={{width:26,height:26,alignItems:'center',justifyContent:'center'}}>
                              <Image style={{height:20,width:20}} source={require('../imgs/center_icon26.png')}/>
                          </View>
                          <Text style={styles.order_list_title}>服务订单</Text>
                      </TouchableOpacity>
                      <TouchableOpacity style={styles.user_order_list} onPress={()=>this.linkJump(MyVoucher)}>
                          <View style={{width:26,height:26,alignItems:'center',justifyContent:'center'}}>
                              <Image style={{height:20,width:20}} source={require('../imgs/center_icon25.png')}/>
                          </View>
                          <Text style={styles.order_list_title}>礼品券码</Text>
                      </TouchableOpacity>
                      <TouchableOpacity style={styles.user_order_list} onPress={()=>this.linkJump(ServiceRecord)}>
                          <View style={{width:26,height:26,alignItems:'center',justifyContent:'center'}}>
                              <Image style={{height:20,width:20}} source={require('../imgs/center_icon26.png')}/>
                          </View>
                          <Text style={styles.order_list_title}>服务记录</Text>
                      </TouchableOpacity>
                  </View>
              </View>
          )
      }
}